package shajie.shajun.mmhf.View.Fragment;

import Util.ImageLoader;
import shajie.shajun.mmhf.Base.BaseFragment;
import shajie.shajun.mmhf.Public_Data;
import shajie.shajun.mmhf.R;
import shajie.shajun.mmhf.databinding.FragmentBigpictureBinding;

/**
 * Created by admin on 2018/1/25.
 */


public class BigPicture_Fragment extends BaseFragment<FragmentBigpictureBinding> {
    private FragmentBigpictureBinding mBinding;
    private String url;
    public static BigPicture_Fragment NewIntence(String url){
        BigPicture_Fragment bigPicture_fragment=new BigPicture_Fragment();
        bigPicture_fragment.setUrl(url);
        return bigPicture_fragment;
    }
    @Override
    public int setlayoutid() {
        return R.layout.fragment_bigpicture;
    }
    @Override
    public void init(FragmentBigpictureBinding binding) {
        this.mBinding=binding;
        Public_Data.number++;
        ImageLoader.load(getContext(),binding.bigpicture,url);

    }
    private void setUrl(String url){
        this.url=url;
    }

    @Override
    public void onDestroy() {
        Public_Data.number--;
        super.onDestroy();

    }
}
